<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./templates/template_general.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="title">
        Liste des enseignes
    </ui:define>

    <ui:define name="content">

        <div class="column4">
            <div class="title" style="float:left;">
                <div style="float:left;">Enseignes</div>
            </div>
            <h:form>  
                <p:dataGrid var="enseigne" styleClass="datagrid_enseignes" value="#{enseigneMBean.enseignes}" columns="3"  
                            rows="6" paginator="true" paginatorTemplate="{CurrentPageReport} {FirstPageLink}
                            {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}
                            {RowsPerPageDropdown}" rowsPerPageTemplate="10,50,100">
                    <p:column>
                        <p:panel header="#{enseigne.nom}" style="text-align:center;width: 210px;">  
                            <h:panelGrid columns="1" style="width:100%;">
                                <p:commandLink action="#{enseigneMBean.detailEnseigne(enseigne)}" title="Visualiser">
                                    <p:graphicImage value="./resources/images/enseignes_img/#{enseigne.imageProfil}" width="150px"/>
                                </p:commandLink>
                                <h:panelGroup>
                                    <p:rating value="#{enseigne.note}" disabled="true"/><h:outputText value="(#{enseigne.notes.size()})"/>
                                </h:panelGroup>
                                <h:outputText value="#{enseigne.description}"/>
                            </h:panelGrid>
                        </p:panel>  
                    </p:column>
                </p:dataGrid>  
            </h:form>
        </div>

    </ui:define>

</ui:composition>
